﻿@using NewLife.Web;
@using XCode;
@using NewLife.Cube.Charts;
@{
    //Layout = NewLife.Cube.Setting.Current.Layout;

    var fact = ViewBag.Factory as IEntityFactory;
    var page = ViewBag.Page as Pager;
    var set = ViewBag.PageSetting as PageSetting ?? PageSetting.Global;

    var charts = ViewBag.Charts as ECharts[];
    var charts2 = ViewBag.Charts2 as ECharts[];
}

<div class="card card-custom gutter-b">
    @if (set.EnableToolbar)
    {
        <div class="card-header pb-0">
            @await Html.PartialAsync("_List_Toolbar")
        </div>
    }
    @if (charts != null && charts.Length > 0)
    {
        <div class="clearfix">
            @foreach (var item in charts)
            {
                @await Html.PartialAsync("_ECharts", item)
            }
        </div>
    }
    <div class="card-body pt-5">
        <div class="table-responsive">
            @await Html.PartialAsync("_List_Data")
        </div>
        <div class="panel-footer">
            @await Html.PartialAsync("_List_Pager")
        </div>
    </div>
    @if (charts2 != null && charts2.Length > 0)
    {
        <div class="clearfix">
            @foreach (var item in charts2)
            {
                @await Html.PartialAsync("_ECharts", item)
            }
        </div>
    }
</div>